import java.util.*;
public class Test2 {
    public static int sum(int nums){
        int count=0;
        for(int i=1;i<Math.sqrt(nums);i++){
            if(nums%i==0){
                count=count+i;
                if(nums/i!=i&&i!=1){
                    count= count+(nums/i);
                }
            }
        }
        return count;
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        //while (in.hasNextInt()) { // 注意 while 处理多个 case
        int a = in.nextInt();
        int count = 0;
        for (int i = 2; i <= a; i++) {
            int b = sum(i);
            if (b == i) {
                count++;
            }
        }
        System.out.println(count);
    }
}